package com.baor.order.service.impl;

import java.util.List;
import com.baor.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baor.order.mapper.TRightMapper;
import com.baor.order.domain.TRight;
import com.baor.order.service.ITRightService;

/**
 * 维权Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-18
 */
@Service
public class TRightServiceImpl implements ITRightService 
{
    @Autowired
    private TRightMapper tRightMapper;

    /**
     * 查询维权
     * 
     * @param rightId 维权主键
     * @return 维权
     */
    @Override
    public TRight selectTRightByRightId(Long rightId)
    {
        return tRightMapper.selectTRightByRightId(rightId);
    }

    /**
     * 查询维权列表
     * 
     * @param tRight 维权
     * @return 维权
     */
    @Override
    public List<TRight> selectTRightList(TRight tRight)
    {
        return tRightMapper.selectTRightList(tRight);
    }

    @Override
    public List<TRight> selectTRightEndList(TRight tRight) {
        return tRightMapper.selectTRightEndList(tRight);
    }

    @Override
    public List<TRight> selectTRightBuyerList(TRight tRight) {
        return tRightMapper.selectTRightBuyerList(tRight);
    }

    @Override
    public List<TRight> selectTRightSellerList(TRight tRight) {
        return tRightMapper.selectTRightSellerList(tRight);
    }

    @Override
    public List<TRight> selectTRightSellerRejectList(TRight tRight) {
        return tRightMapper.selectTRightSellerRejectList(tRight);
    }

    /**
     * 新增维权
     * 
     * @param tRight 维权
     * @return 结果
     */
    @Override
    public int insertTRight(TRight tRight)
    {
        tRight.setCreateTime(DateUtils.getNowDate());
        return tRightMapper.insertTRight(tRight);
    }

    /**
     * 修改维权
     * 
     * @param tRight 维权
     * @return 结果
     */
    @Override
    public int updateTRight(TRight tRight)
    {
        return tRightMapper.updateTRight(tRight);
    }

    /**
     * 批量删除维权
     * 
     * @param rightIds 需要删除的维权主键
     * @return 结果
     */
    @Override
    public int deleteTRightByRightIds(Long[] rightIds)
    {
        return tRightMapper.deleteTRightByRightIds(rightIds);
    }

    /**
     * 删除维权信息
     * 
     * @param rightId 维权主键
     * @return 结果
     */
    @Override
    public int deleteTRightByRightId(Long rightId)
    {
        return tRightMapper.deleteTRightByRightId(rightId);
    }
}
